<template>
    <div>
        <h1>我是主页</h1>
        <a-button type="primary" danger @click="getOut">退出登录</a-button>
    </div>
</template>

<script lang='ts'>
import {defineComponent, ref, reactive, toRefs, computed} from 'vue'
import storage from "@/utils/storage"
import {useRouter} from "vue-router"
export default defineComponent({
  setup(){
    let router = useRouter();
    let getOut = () => {
      storage.remove("token")
      storage.remove("userInfo")
      router.push({
        path:"/login",
      })
    }
    
    return{
      getOut,
    
    }
  },
});
</script>

<style scoped >

</style>
